package com.assets.room.dao;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;

import com.assets.room.database.MyDataBase;
import com.assets.room.entity.Scrap;

import java.util.List;

@Dao
public interface ScrapDao {

    @Insert
    void insert(Scrap scrap);

    @Insert
    void insert(List<Scrap> scrap);

    @Query("SELECT * FROM t_asset_scrap")
    List<Scrap> getAllData();

    @Query("SELECT * FROM t_asset_scrap WHERE scrap_id = :scrap_id")
    Scrap getScrapById(String scrap_id);

    @Query("DELETE FROM t_asset_scrap")
    void deleteAllData();

}
